import { createStore, applyMiddleware } from 'redux';
import RootReducer from './reducers/rootReducer';
// import thunk from 'redux-thunk';
// import logger from './middleware/logger';
// import thunk from './middleware/thunk';
import createSagaMiddleware from '@redux-saga/core';
import counterSaga from './sagas/demo.sgas';
// 创建sagamiddleware
const sagaMiddleware = createSagaMiddleware();

export const store = createStore(RootReducer, applyMiddleware(sagaMiddleware));
sagaMiddleware.run(counterSaga);
